package cn.suimg.neo4j.repository;

import cn.suimg.neo4j.relationship.IncludeRelationship;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface IncludeRelationshipRepository extends Neo4jRepository<IncludeRelationship, Long> {

    @Query("match r = (albumGraph:专辑 {albumId:{0}}) -[rel:包含] -> (songGraph:歌曲 {songId:{1}}) return distinct r")
    IncludeRelationship findByAlbumIdAndSongId(Integer albumId,Integer songId);

}
